package com.leo.common;

/**
 * 返回码
 *
 * @author liusl
 * @version 1.0
 * @date 2018/12/8 21:01
 */
public enum ReturnCodeEnum implements ReturnCode {
    /**/
    SUCCESS(0, "请求成功"),
    FAILURE_CODE(100, "请求失败"),
    EDIT_FAILURE(400, "编辑失败"),
    DELETE_FAILURE(401,"删除失败"),
    INSERT_FAILURE(402,"插入失败!!!"),
    ;

    private int returnCode;
    private String returnDesc;

    ReturnCodeEnum(int returnCode, String returnDesc) {
        this.returnCode = returnCode;
        this.returnDesc = returnDesc;
    }

    @Override
    public int getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(int returnCode) {
        this.returnCode = returnCode;
    }

    @Override
    public String getReturnDesc() {
        return returnDesc;
    }

    public void setReturnDesc(String returnDesc) {
        this.returnDesc = returnDesc;
    }
}
